package imgs;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.InputStream;

public class ImageResource {
	public static InputStream getInputStream(String name) {
		return ImageResource.class.getResourceAsStream(name);
	}

	public static BufferedImage getImage(String name) {
		try {
			return ImageIO.read(getInputStream(name));
		} catch (IOException e) {
			return null;
		}
	}
}
